package br.com.iswe.gwt.ui.client;

import br.com.iswe.core.entidades.gwt.BeanMap;
import br.com.iswe.core.entidades.gwt.RemoteEntityObject;

import com.google.gwt.user.client.ui.CheckBox;

public class CheckBoxBag extends CheckBox implements PropertiesBag{

	private BeanMap bean = new BeanMap();
	
	private RemoteEntityObject entityObject = null;
	
	public CheckBoxBag(){
		super();
	}
	
	public CheckBoxBag(RemoteEntityObject entityObject) {
		this.entityObject = entityObject;
	}
	
	public CheckBoxBag(String label){
		super(label);
		setStyleName("gwt-Label");
	}
	
	public CheckBoxBag(BeanMap bean) {
		this.bean = bean;
	}

	public String getPropriedade(String chave) {
		return bean.getString(chave);
	}

	public void setPropriedade(String chave, String valor) {
		bean.put(chave, valor);
	}
	
	public BeanMap getBean() {
		return bean;
	}

	public RemoteEntityObject getEntityObject() {
		return entityObject;
	}

	public void setEntityObject(RemoteEntityObject entityObject) {
		this.entityObject = entityObject;
	}
	
	
}
